\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{prijedlog}[2008/09/03 ZESOI - FER]

% Opis izlaznog dokumenta - odabrati dvips za optimalni PostScript
% dokument, a dvipdfm za optimalni PDF dokument.
% Odmah odredi i pretpostavljene nastavke za sliku - korisno kada
% postoji optimirana slika i kao EPS i kao PDF.
% Znak komentara na kraju linije je potreban.
\DeclareOption{dvips}
 {\PassOptionsToPackage{\CurrentOption}{graphicx}%
  \AtEndOfPackage{\DeclareGraphicsExtensions{.eps}}}
\DeclareOption{dvipdfm}
 {\PassOptionsToPackage{\CurrentOption}{graphicx}%
  \AtEndOfPackage{\DeclareGraphicsExtensions{.pdf}}}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
\ExecuteOptions{dvips}
\ProcessOptions\relax

% Osnovna klasa koju nadograđujemo.
\LoadClass[a4paper,10pt]{article}

% Paketi za hrvatski jezik i uključivanje slika.
\RequirePackage[utf8]{inputenc}
\RequirePackage[croatian]{babel}
\RequirePackage{graphicx}
\RequirePackage{hyperref}
\RequirePackage{amssymb}
\RequirePackage{amsmath}

% Stranice su bez brojeva.
\pagestyle{empty}

% Zaglavlje prve stranice
\def\predmet#1{\gdef\@predmet{#1}}
\gdef\@predmet{\@latex@warning@no@line{Predmet nije definiran. Koristi \noexpand\predmet za definiranje}}
\def\projekt#1{\gdef\@projekt{#1}}
\gdef\@projekt{\@latex@warning@no@line{Naslov rada nije definiran. Koristi \noexpand\projekt za definiranje}}
\font\arialHuge=cmssbx10 at 30pt
\font\arialhuge=cmssbx10 at 25pt
\font\arialLARGE=cmssbx10 at 22pt
\font\arialLarge=cmssbx10 at 18pt
\font\ariallarge=cmssbx10 at 14pt
\font\arialnormal=cmssbx10 at 11pt
\font\arialtitle=cmssbx10 at 14pt
\font\arialauthor=cmss12 at 11pt
\font\arialdate=cmss12 at 11pt
\renewcommand\maketitle{%
  \let\footnotesize\small
  \let\footnoterule\relax
  \let \footnote \thanks
  \vskip -50\p@
  \begin{center}%
    {\arialauthor \@predmet \par}%
    {\arialdate \@date}%
    \vskip 10\p@
    {\arialtitle Prijedlog praktičnog rada:\hskip1em\@projekt \par}%
  \end{center}\par%
  \@thanks
  \vskip 10\p@
  \setcounter{footnote}{0}%
  \global\let\maketitle\relax
  \global\let\@predmet\@empty
  \global\let\@rok\@empty
  \global\let\@date\@empty
  \global\let\brvjezbe\relax
  \global\let\date\relax
  \global\let\thanks\relax
  \global\let\@thanks\@empty
  \global\let\@author\@empty
  \global\let\@title\@empty
  \global\let\title\relax
  \global\let\author\relax
  \global\let\and\relax
}

% Definiraj potrebne okoline.
\newenvironment{tema}{\noindent\hskip -1em{\arialnormal%
Tema:\par}}{\vskip 6pt plus 3pt minus 1pt}
\newenvironment{cilj}{\noindent\hskip -1em{\arialnormal%
Cilj:\par}}{\vskip 6pt plus 3pt minus 1pt}
\newenvironment{zadatak}{\noindent\hskip -1em{\arialnormal%
Zadatak:\par}}{\vskip 6pt plus 3pt minus 1pt}
\newenvironment{rezultat}{\noindent\hskip -1em{\arialnormal%
Očekivani rezultat:\par}}{\vskip 6pt plus 3pt minus 1pt}
\newenvironment{studenti}{\noindent\hskip -1em{\arialnormal%
Sudionici projekta:\par}}{\vskip 6pt plus 3pt minus 1pt}
\newenvironment{tijek}{\noindent\hskip -1em{\arialnormal%
Ovirni tijek izvođenja projekta:\par}}{\vskip 6pt plus 3pt minus 1pt}

% Liste prve razine su označene s crticom, a druge točkom.
\def\labelitemi{$-$}
\def\labelitemii{$\bullet$}

% Popravi postavljanje točke.
\renewcommand\thesection{\@arabic\c@section.}
\renewcommand\thesubsection{\thesection\@arabic\c@subsection.}
\renewcommand\thesubsubsection{\thesubsection\@arabic\c@subsubsection.}
\renewcommand\theequation{\ifnum \c@chapter>\z@ \thechapter\fi \@arabic\c@equation}
\renewcommand\thefigure{\ifnum \c@chapter>\z@ \thechapter\fi \@arabic\c@figure.}
\renewcommand\thetable{\ifnum \c@chapter>\z@ \thechapter\fi \@arabic\c@table.}

% Dimenzije stranice, proredi te razmaci između odlomaka.
% Gornja, lijeva i desna margina su 3cm a donja je 3.5 cm.
\setlength\hoffset{0.46cm}
\setlength\voffset{-10.913pt}
\setlength\oddsidemargin{0cm}
\setlength\textwidth{15cm}
\setlength\textheight{23.2cm}
\setlength\parindent{3em}
\setlength\topmargin{0pt}
\setlength\headsep{10pt}
\setlength\headheight{14pt}
\setlength\footskip{24pt}
\setlength\parskip{5pt plus 3pt minus 1pt}


